<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>首页-pdf预览关键字定位和高亮</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script th:src="@{/js/jquery-3.5.1.min.js}"></script>
    <script th:src="@{/pdfjs/build/pdf.js}"></script>
    <style>
        canvas {
            border: 1px solid black;
        }
    </style>
</head>
<body>

<input type="text" id="keyword" placeholder="Enter keyword to highlight">
<button onclick="highlightKeyword()">Highlight</button>
<canvas id="pdf-canvas"></canvas>
<script th:src="@{/js/pdf_preview.js}"></script>

</body>
</html>